package com.study.entity;  


/**  
 *  实体类
 */  
public class Staff  
{  
    /********** 实体的属性 ***********/  
     //主键 自增
    private int id;
    private String name;  //姓名
    private String sex;  //性别
    private String photo;  //照片
    private String username;  //用户名
    private String password;  //密码
    private int roleId;  //权限
	private Role role;
    /********** 构造方法 ***********/  
    public Staff() {  
      
    }  
  
    public Staff(String name, String sex, String photo, String username, String password, int roleId) {  
        this.name = name;  
        this.sex = sex;  
        this.photo = photo;  
        this.username = username;  
        this.password = password;  
        this.roleId = roleId;  
    }  
  
    /********** get/set 方法 ***********/  
    
    public int getId() {
        return id;
    }
    
    public void setId(int id) {
        this.id = id;
    }
    
    public String getName() {  
        return name;  
    }  
  
    public void setName(String name) {  
        this.name = name;  
    }
    
      
    public String getSex() {  
        return sex;  
    }  
  
    public void setSex(String sex) {  
        this.sex = sex;  
    }
    
      
    public String getPhoto() {  
        return photo;  
    }  
  
    public void setPhoto(String photo) {  
        this.photo = photo;  
    }
    
      
    public String getUsername() {  
        return username;  
    }  
  
    public void setUsername(String username) {  
        this.username = username;  
    }
    
      
    public String getPassword() {  
        return password;  
    }  
  
    public void setPassword(String password) {  
        this.password = password;  
    }
    
      
    public int getRoleId() {  
        return roleId;  
    }  
  
    public void setRoleId(int roleId) {  
        this.roleId = roleId;  
    }
    
	public Role getRole() {
		return role;
	}
	
	public void setRole(Role role) {  
        this.role = role;  
    }
	
	
      

	@Override
	public String toString() {
		return "Staff [id=" + id 
				+ ", name=" + name
				+ ", sex=" + sex
				+ ", photo=" + photo
				+ ", username=" + username
				+ ", password=" + password
				+ ", roleId=" + roleId
				+ "]";
    }
}